﻿@model Eqwww.Domain.Models.SystemManage.ModuleButtonModel
@inject Eqwww.App.Identity.UserApp UserApp
@{
    ViewData["Title"] = "Details";
    Layout = "~/Views/Shared/_ManageIndexLayout.cshtml";
}

<div class="mdui-container">
    <div class="mdui-row">
        <div class="mdui-col-xs-12 mdui-col-md-6">

            <div class="mdui-typo-title mdui-p-t-4">基本信息</div>
            <div class="mdui-list">
                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.Name)
                        </div>
                        <div class="mdui-list-item-title">
                            @Html.DisplayFor(model => model.Name)
                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.Code)
                        </div>
                        <div class="mdui-list-item-title">
                            @Html.DisplayFor(model => model.Code)
                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.ModuleId)
                        </div>
                        <div class="mdui-list-item-title">
                            @Html.DisplayFor(model => model.Module.Name)
                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.ParentId)
                        </div>
                        <div class="mdui-list-item-title">
                            @Html.DisplayFor(model => model.Parent.Name)
                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.Url)
                        </div>
                        <div class="mdui-list-item-title">
                            @Html.DisplayFor(model => model.Url)
                        </div>
                    </div>
                </div>

                

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.SortCode)
                        </div>
                        <div class="mdui-list-item-title">
                            @Html.DisplayFor(model => model.SortCode)
                        </div>
                    </div>
                </div>

                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.Icon)
                        </div>
                        <div class="mdui-list-item-title">
                            <i class="mdui-icon material-icons">@Model.Icon</i>
                            @Html.DisplayFor(model => model.Icon)

                        </div>
                    </div>
                </div>

                
                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-text">
                            @Html.DisplayNameFor(model => model.IsSystem)
                        </div>
                        <div class="mdui-list-item-title">
                            @if (Model.IsSystem == true)
                            {
                                <text>是</text>
                            }
                            else
                            {
                                <text>否</text>
                            }
                        </div>
                    </div>
                </div>

            </div>
            <div class="mdui-divider"></div>

        </div>   

        <div class="mdui-col-xs-12 mdui-col-md-6">
            <div class="mdui-typo-title mdui-p-t-4">关联策略</div>
            <div class="mdui-list">
            @{
                var relatedStrategorys=ViewBag.RelatedStrategorys as List<Eqwww.Domain.Models.SystemManage.StrategoryModel>;
                if(relatedStrategorys!=null&&relatedStrategorys.Count()>0){
                    foreach(var item in relatedStrategorys){
                <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                        <div class="mdui-list-item-title">
                            @item.Name
                            
                        </div>
                        @if(!string.IsNullOrEmpty(item.Description)){
                                <div class="mdui-list-item-text">
                                    @item.Description
                                </div>
                        }
                    </div>
                </div>
                    }
                }
                else{
                    <div class="mdui-list-item mdui-ripple">
                    <div class="mdui-list-item-content">
                            <span class="mdui-text-color-theme-accent">按钮未关联任何策略</span>
                        </div>
                    </div>
                }
            }
              
            </div>
            <div class="mdui-divider"></div>
        </div>
        
    </div>
</div>


